package com.jubotech;

import com.jubotech.framework.config.RobotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableAsync;

import tk.mybatis.spring.annotation.MapperScan;

import javax.annotation.PostConstruct;

@EnableAsync //开启异步调用
@EnableCaching//开启缓存
@SpringBootApplication
//Spring Boot项目的核心注解，主要目的是开启自动配置，加了这个注解，后springboot会扫描本包及子包的所有javabean；
@MapperScan(basePackages = "com.jubotech.business.web.dao")
public class SpringBootStarter {

	@Autowired
	private RobotService robotService;
	public static void main(String[] args) {
		 //SpringBoot项目入口
		//输出
		 SpringApplication.run(SpringBootStarter.class, args);
	}
	@PostConstruct
	public void init() {
		robotService.startRobotTask();
	}

}
